<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateVehiculoTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateVehiculoLabel_idVehiculo}" for="idVehiculo" />
                    <h:inputText id="idVehiculo" value="#{vehiculoController.selected.idVehiculo}" title="#{bundle.CreateVehiculoTitle_idVehiculo}" required="true" requiredMessage="#{bundle.CreateVehiculoRequiredMessage_idVehiculo}"/>
                    <h:outputLabel value="#{bundle.CreateVehiculoLabel_placa}" for="placa" />
                    <h:inputText id="placa" value="#{vehiculoController.selected.placa}" title="#{bundle.CreateVehiculoTitle_placa}" />
                    <h:outputLabel value="#{bundle.CreateVehiculoLabel_anoFabricacion}" for="anoFabricacion" />
                    <h:inputText id="anoFabricacion" value="#{vehiculoController.selected.anoFabricacion}" title="#{bundle.CreateVehiculoTitle_anoFabricacion}" />
                    <h:outputLabel value="#{bundle.CreateVehiculoLabel_cedulaPropietario}" for="cedulaPropietario" />
                    <h:inputText id="cedulaPropietario" value="#{vehiculoController.selected.cedulaPropietario}" title="#{bundle.CreateVehiculoTitle_cedulaPropietario}" />
                    <h:outputLabel value="#{bundle.CreateVehiculoLabel_nombrePropietario}" for="nombrePropietario" />
                    <h:inputText id="nombrePropietario" value="#{vehiculoController.selected.nombrePropietario}" title="#{bundle.CreateVehiculoTitle_nombrePropietario}" />
                    <h:outputLabel value="#{bundle.CreateVehiculoLabel_apellidoPropietario}" for="apellidoPropietario" />
                    <h:inputText id="apellidoPropietario" value="#{vehiculoController.selected.apellidoPropietario}" title="#{bundle.CreateVehiculoTitle_apellidoPropietario}" />
                    <h:outputLabel value="#{bundle.CreateVehiculoLabel_modelo}" for="modelo" />
                    <h:selectOneMenu id="modelo" value="#{vehiculoController.selected.modelo}" title="#{bundle.CreateVehiculoTitle_modelo}" required="true" requiredMessage="#{bundle.CreateVehiculoRequiredMessage_modelo}">
                        <f:selectItems value="#{modeloController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateVehiculoLabel_marca}" for="marca" />
                    <h:selectOneMenu id="marca" value="#{vehiculoController.selected.marca}" title="#{bundle.CreateVehiculoTitle_marca}" required="true" requiredMessage="#{bundle.CreateVehiculoRequiredMessage_marca}">
                        <f:selectItems value="#{marcaController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateVehiculoLabel_color}" for="color" />
                    <h:selectOneMenu id="color" value="#{vehiculoController.selected.color}" title="#{bundle.CreateVehiculoTitle_color}" required="true" requiredMessage="#{bundle.CreateVehiculoRequiredMessage_color}">
                        <f:selectItems value="#{colorController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{vehiculoController.create}" value="#{bundle.CreateVehiculoSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{vehiculoController.prepareList}" value="#{bundle.CreateVehiculoShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateVehiculoIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
